home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Chkdsk Timeout.xpl < prev    next >
Text File  |  2001-04-12  |  2KB  |  72 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="2"
  3. "COUNT"="1"
  4. "UIPATH 1"="Startup/Shutdown\Startup\Windows NT/2K/XP\00) Boot-Up Blue Screen"
  5. "NAME"="Boot-time Autocheck Countdown"
  6. "VERSION"="1.03"
  7. "OSVERSION"="0101011"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Timeout (sec)"
  10. "DESCRIPTION 1"="Windows NT and Windows 2000 only. Requires administrator privileges."
  11. "DESCRIPTION 2"="When you schedule CHKDSK to run at next boot time for a locked disk, the system will prompt you to press a key to cancel the operation."
  12. "DESCRIPTION 3"="The system will display a countdown during that cancel period. The default value is 10 seconds."
  13. "DESCRIPTION 4"="You can put in any value from zero to 259,200 seconds (3 days). With a timeout of zero, there is no countdown and you cannot cancel the operation."
  14. "DESCRIPTION 5"="To reset the default value, clear the input field."
  15. "AUTHOR"="Pierre Szwarc"
  16. "CONTACTURL"="http://www.xteq.com"
  17. "COPYRIGHT"="Copyright (C) 2000, Xteq Systems"
  18. "COMMENT 1"="This plug-in lets you change (typically, shorten) the wait for CHKDSK at boot time."
  19. "COMMENT 2"="Source: MS KB article Q191603"
  20.  
  21. 'Declaration of some constants
  22. sV = "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\AutoChkTimeOut"
  23. bDf = true  ' Default value applies
  24. bCh = false ' Changes have been made
  25.  
  26. 'Called when the Plugin is started
  27. SUB Plugin_Initialize
  28.    i = RegReadValue(sV)
  29.    if IsEmpty(i) = false then
  30.      SetUIElement 1, i
  31.      bDf = false
  32.    else
  33.      bDf = true
  34.    end if
  35. END SUB
  36.  
  37. 'Called when the Plugin should validate the Data the user has entered
  38. SUB Plugin_CheckData(ElementIndex)
  39. END SUB
  40.  
  41. 'Called when the Plugin should apply the changes
  42. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  43.  sD = GetUIElement(1)
  44.  if len(sD) <= 0 then
  45.    bDf = true
  46.  else
  47.    if sD < 0 or sD > 259200 then
  48.      Call MsgError("Value " & sD & " outside allowed range (0-259,200)")
  49.    else
  50.      bDf = false
  51.    end if
  52.  end if
  53.  
  54.  if bDf then
  55.    i = RegPathExists(sV)
  56.    if IsEmpty(i) = false then
  57.      RegDeletePath sV
  58.      bCh = true
  59.    end if
  60.  else
  61.    RegWriteValue sV, GetUIElement(1), 2
  62.    bCh = true
  63.  end if
  64. END SUB
  65.  
  66. 'Called when the Plugin is about to be removed from memory
  67. SUB Plugin_Terminate
  68.  if bCh then
  69.    Restart
  70.  end if
  71. END SUB
  72.